//
//  LLHomeWebViewController.swift
//  WeiBoShiBing
//
//  Created by Bingo on 15/11/11.
//  Copyright © 2015年 Bingo. All rights reserved.
//

import UIKit
import SVProgressHUD
class LLHomeWebViewController:UIViewController,UIWebViewDelegate {

    
    var url:NSURL?
    
    override func loadView() {
        
        view = webView
        
        webView.delegate = self
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        if let urlString = self.url{
        
            let request = NSURLRequest(URL: urlString)
            
            webView.loadRequest(request)
        }
    }
    
    func webViewDidStartLoad(webView: UIWebView) {
        SVProgressHUD.showWithStatus("正在加载", maskType: SVProgressHUDMaskType.Black)
    }
    
    func webViewDidFinishLoad(webView: UIWebView) {
        SVProgressHUD.dismiss()
    }
    
    private lazy var webView = UIWebView()
}
